const API_BASE = 'https://ohmyla.ximengjk.com';
// const API_BASE = 'http://127.0.0.1:80';
// Dify 配置
const DIFY_BASE = 'https://ohmyla.ximengjk.com:18080/v1';
const DIFY_CHAT_MESSAGES = DIFY_BASE + '/chat-messages';
const DIFY_FILE_UPLOAD = DIFY_BASE + '/files/upload';
const DIFY_SUGGESTED = DIFY_BASE + '/messages/'; // + {message_id} + '/suggested'
// WebSocket 代理（本地）
const WS_PROXY_URL = 'wss://ohmyla.ximengjk.com/ws/dify-chat/app-nNFsc6sFgxQjYRN328BVovte';
// const WS_PROXY_URL = 'ws://127.0.0.1:80/ws/dify-chat/app-nNFsc6sFgxQjYRN328BVovte';
// 说明：安全起见，API-Key 不应硬编码在前端。此处按需求先占位，建议后续改由后端代理。
const DIFY_API_KEY = 'app-nNFsc6sFgxQjYRN328BVovte'; // 生图/图片应用 Key（通过网关 token 使用）
const DIFY_DIALOG_API_KEY = 'app-yzVObEJuoU8Wt6GxyfkHPTgS'; // 智能对话应用 Key（用于 suggested 与对话）

module.exports = {
    base: API_BASE, // API基础路径
    AuthLoginByWeixin: API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/loginByWeixin', //微信登录
    getPhoneNumber: API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/getUserPhone/', //解析手机号码
    modifyUserAvatarUrl: API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/modifyUserAvatarUrl', //更新头像url
    getHomeInfo:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchIndexPageData', //首页信息
    zhengceList:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchArticleList/0/', //中考政策列表
    baikeList:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchArticleList/1/', //中考百科列表
    gonggaoList:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchArticleList/3/', //公告查询
    articleDetail:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchArticleDetail/', //文章详情
    schoolList:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchSchoolPage/',//高校列表
    schoolDetail:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchSchoolDetail/',//高校详情
    schoolTabs:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchArticleList/',//高校
    getUserInfo:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/getWeChatUserInfo', //获取用户信息
    sendSMS:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/sendSms', //发送验证码
    verifySMS:API_BASE + '/api/InterfaceManageRestService/v1/interfacemanage/verifySms',//校验验证码
    getBatchList:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchBatchList', //获取高校批次字典
    getSchoolChannelAriticleList:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchArticleList/2/',//获取高校栏目文章列表
    collectionSchool:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/insertUserSchoolCollect',//高校收藏
    cancelCollectionSchool:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/cancelUserSchoolCollect', //取消收藏
    collectionSchoolList:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchUserSchoolCollectListPage/',//高校收藏列表
    examList:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchUserExamList',//考试信息列表
    examDetail:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchUserExamById/',//考试详情
    addExam:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/addUserExam',//增加考试信息,
    modifyExam:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/modifyUserExam',//修改考试信息
    deleteExam:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/deleteUserExamById/',//删除考试信息
    modifyUserInfo:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/updateWeChatUserInfo',//修改用户信息
    uploadFile:API_BASE + '/uploadimage',//上传文件
    reportOpinion:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/insertOpinion',//意见反馈
    examPlanList:API_BASE + '/api/ExamPlanRestService/v1/plan/searchUserExamPlanList',//报考方案列表
    examPlanDetail:API_BASE + '/api/ExamPlanRestService/v1/plan/searchUserExamPlanDetail/',//报考方案详情
    examGeneratePlan:API_BASE + '/api/ExamPlanRestService/v1/plan/generateExamPlan',//生成报考方案
    getStudyTagList:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchSystemTagList',//获取学习态度列表
    downloadExamPlan:API_BASE + '/examPlan/downloadExamPlan/',//下载报考方案
    addPicChat:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/addPicChat',//添加生图记录
    searchUserPicChatList:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchUserPicChatList',//获取用户生图记录列表
    searchUserPicChatPrompt:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/searchUserPicChatPrompt',//获取随机提示词
    getLatestPicChatRecord:API_BASE + '/api/InterfaceManageRestService/v1/interfaceManage/getLatestPicChatRecord',//获取最近一次生图记录
    // Dify
    dify: {
        base: DIFY_BASE,
        chatMessages: DIFY_CHAT_MESSAGES,
        fileUpload: DIFY_FILE_UPLOAD,
        suggested: DIFY_SUGGESTED,
        apiKey: DIFY_API_KEY,
        dialogApiKey: DIFY_DIALOG_API_KEY,
        wsProxy: WS_PROXY_URL
    }
}
